char *

Module: ecereCOM
Type: Class
Base Class: Instance

Description

Core C 'char *' data type, mostly equivalent to the String data type. Ecere APIs taking a String or char * representing text expect UTF-8 encoding.

Usage


Used in the declaration section of code, which is before any statements.

A variable declared as being a char * can be assigned any literal string which is enclosed between double quotation marks (" ").

A key thing to remember is that the * is attached to the name of the variable, not the type.

Example

char * thisString; // A stand alone declaration of a char *.
char * aString, * bString; // Declaring two char *s at the same time.
char * cString = "Hello", char * dString = "World"; // Declaring and initializing two chars and initializing them at the same time.
________________________________________

class Hello : Application
{
void Main()
{
char * helloString = "Hello, World!";
printf("%s\n", helloString);
}
}



Output:
Hello, World!

Remarks


char * is equivalent to char * in C.

Derived Classes

String

See Also


bool, byte, char, double, enum, float, int, int64, uint, uint16, uint32, uint64